package com.jiangjiang.eshop.comment.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 评论聚合统计信息,一个商品一条聚合数据
 *
 * @author zhonghuashishan
 */
@Data
@TableName("comment_aggregate")
public class CommentAggregateEntity implements Serializable {
	private static final long serialVersionUID = 1L;
	/**
	 * id
	 */
	@TableId(value = "id",type = IdType.AUTO)
	private Long id;
	/**
	 * 商品id
	 */
	@TableField("goods_id")
	private Long goodsId;
	/**
	 * 总评论数
	 */
	@TableField("total_comment_count")
	private Long totalCommentCount;
	/**
	 * 好评数
	 */
	@TableField("good_comment_count")
	private Long goodCommentCount;
	/**
	 * 好评率
	 */
	@TableField("good_comment_rate")
	private Double goodCommentRate;
	/**
	 * 晒图评论数
	 */
	@TableField("show_pictures_comment_count")
	private Long showPicturesCommentCount;
	/**
	 * 中评评论数
	 */
	@TableField("medium_comment_count")
	private Long mediumCommentCount;
	/**
	 * 差评评论数
	 */
	@TableField("bad_comment_count")
	private Long badCommentCount;
	/**
	 * 评论聚合统计信息的创建时间
	 */
	@TableField(value = "gmt_create", fill = FieldFill.INSERT)
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
	private Date gmtCreate;
	/**
	 * 评论聚合统计信息的修改时间
	 */
	@TableField(value = "gmt_modified",fill = FieldFill.INSERT_UPDATE)
	@JsonFormat(pattern = "yyyy-MM-dd HH::mm:ss",timezone = "GMT+8")
	private Date gmtModified;


}
